<?
require_once("conn.php");

?>
<ul style="text-align:left;">
	<li><b>Store</b></li>
	<?
		$sql = "SELECT * FROM security WHERE Name='".$_SESSION["usernames"]."'";
		$query = mysql_query($sql);
		$nums = mysql_num_rows($query);
	
		if($nums < 1){
			if(checkAccess("0")){
	?>
				<li><a href="#" onclick="Order()">Order</a></li>
	<?
			}
			if(checkAccess("1")){
	?>
				<li><a href="#" onclick="Logoshop_Report()">Accept Order</a></li>
				<li><a href="#" onclick="Logoshop_Report()">Send Order To Office</a></li>
	<?
			}
			if(checkAccess("2,3,4")){
	?>
				<li><a href="#" onclick="Product_Main()">Product Management</a></li>
	<?
			}
			
		}else{
		if(checkAccess("6")){
		?>
			<li><a href="#" onclick="Logoshop_Report()">Report Logoshop</a></li>
		<?
		}
	}
		
	?>
	<li>&nbsp;</li>
	<li><b>Logoshop</b></li>
	<?
		if(checkAccess("5")){
	?>
				<li><a href="#" onclick="Logoshop_Main()">Stock Logoshop</a></li>
	<?
			}
			if(checkAccess("6")){
	?>
				<li><a href="#" onclick="Logoshop_Report()">Report Logoshop</a></li>
	<?
			}
	?>
	<li><a href="#" onclick="Logoshop_Report()">Accept Order</a></li>
	<li>&nbsp;</li>
	<li><b>Purchase</b></li>
	<li><a href="#" onclick="Logoshop_Report()">Send Order</a></li>
	<li><a href="#" onclick="Logoshop_Report()">Order Not Accept</a></li>
	<li><a href="#" onclick="Logoshop_Report()">Receive Order From Island</a></li>

	<li>&nbsp;</li>
	<li><b>System</b></li>
	<li><a href="#" onclick="History()">History Order</a></li>
	<li><a href="#" onclick="History()">History Receive</a></li>
	<?
	if(checkAccess("7")){
		?>
			<li><a href="#" onclick="editAccess()">AccessList</a></li>
		<?
		}
		?>
	<li><a href="logout.php">Logout</a></li>
</ul>